﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LinqToBing.Bing.Wrapper.Enums;

namespace LinqToBing.Bing.Wrapper.Interfaces
{
    /// <summary>
    /// Base interface for search requests.
    /// </summary>
    public interface ISearchRequest : ISearch
    {
        /// <summary>
        /// The query value to search for (as string).
        /// </summary>
        string Query { get; set; }

        /// <summary>
        /// The query value to search for (as string).
        /// </summary>
        List<SearchSource> Sources { get; set; }

        /// <summary>
        /// Number of results required. Use 0 or not specify at all to receive all.
        /// </summary>
        int? Count { get; set; }

        /// <summary>
        /// Number of items to skip (used for page splitting).
        /// </summary>
        int? Offset { get; set; }

        /// <summary>
        /// Verify if conditions allow search execution.
        /// </summary>
        bool CanExecute { get; }

        /// <summary>
        /// If the query is executed or not.
        /// </summary>
        /// <remarks>
        ///  It it not provided from Bing engine.
        ///  </remarks>        
        bool Executed { get; } 

        /// <summary>
        /// Result of the search execution.
        /// </summary>
        /// <returns></returns>
        ISearchResult Execute();
    }
}
